package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/09/10 22:44
 **/
public class Day8_4_Num226_InvertTree {
    class Solution {
        public TreeNode invertTree(TreeNode root) {
            if(root == null) return null;
            TreeNode left = root.left;
            root.left = invertTree(root.right);
            root.right = invertTree(left);
            return root;
        }
    }
}